load("//src/e2e-app:test_suite.bzl", "e2e_test_suite")
load("//tools:defaults.bzl", "markdown_to_html", "ng_web_test_suite", "ts_library")

package(default_visibility = ["//visibility:public"])

ts_library(
    name = "testing",
    srcs = glob(
        ["**/*.ts"],
        exclude = [
            "**/*.spec.ts",
        ],
    ),
    module_name = "@angular/cdk/testing",
)

markdown_to_html(
    name = "overview",
    srcs = ["test-harnesses.md"],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)

ng_web_test_suite(
    name = "unit_tests",
    # We need to load Kagekiri statically since it is not a named AMD module and needs to
    # be manually configured through "require.js" which is used by "karma_web_test_suite".
    static_files = [
        "@npm//kagekiri",
    ],
    deps = [
        ":require-config.js",
        "//src/cdk/testing/tests:unit_test_sources",
    ],
)

e2e_test_suite(
    name = "e2e_tests",
    deps = [
        "//src/cdk/testing/tests:e2e_test_sources",
    ],
)
